package com.huangpeng.designmodel.dubbo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author hp
 * @Title 实现类
 * @Package
 * @Date 2022/1/19 15:59
 * @Description
 * @Version 1.0
 */
public class DemoServiceImpl implements DemoService{
    @Override
    public String sayHello(String name) {
        return "hello " + name;
    }

    @Override
    public List getUsers() {
        List list = new ArrayList();
        User u1 = new User();
        u1.setName("jack");
        u1.setAge(20);
        u1.setSex("男");
        list.add(u1);

        User u2 = new User();
        u2.setName("tom");
        u2.setAge(21);
        u2.setSex("女");
        list.add(u2);

        return list;
    }
}
